﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace Eniux.Windows.Interactivity
{
    public interface IAttachedObject
    {
        /// <summary>
        /// 获得关联的对象
        /// </summary>
        /// <remarks>代表此实例附加到的对象</remarks>
        DependencyObject AssociatedObject { get; }

        /// <summary>
        /// 附加到指定的对象
        /// </summary>
        /// <param name="dependencyObject">要附加到的对象</param>
        void Attach(DependencyObject dependencyObject);

        /// <summary>
        /// 将此实例与其关联的对象分离
        /// </summary>
        void Detach();
    }
}
